import VueRouter from 'vue-router'
import Home from '../view/home/Home'
import Login from '../view/login/Login'
import operate from '../view/operation/operate'
import register from '../view/register/register'

const router = new VueRouter({
  routes: [
    {
      path:'/',
      name:'Login',
      component:Login,
    },
    {
      path:'/register',
      name:'Register',
      component:register,
      children:[
        {
        path:'/register/register',
        name:'register',
          component:()=>import('../components/register-form/register-form')
      },
        {
          path:'/register/forget',
          name:'forget',
          component:()=>import('../components/forget-form/forget-form')
        }
      ]
    },
    {
      path: '/home',
      name:'Home',
      component: Home,
    },
    {
      path:'/operate',
      name:'Operate',
      component:operate,
      children:[
        {
          path:'/operate/dataUpload',
          name:'dataUpload',
          component:()=>import('../view/operation/dataUpload/dataUpload')
      },
        {
          path:'/operate/dataSetManage',
          name:'dataSetManage',
          component:()=>import('../view/operation/dataSetManage/dataSetManage'),
        },
        {
          path:'/operate/dataSetShow',
          name:'dataSetShow',
          component:()=>import('../view/operation/dataSetShow/dataSetShow')
        }
      ]
    },
    {
      path:'/admin',
      name:'admin',
      component:operate,
      children:[
        {
          path:'/admin/userManage',
          name:'userManage',
          component:()=>import('../view/admin/userManage/userManage')
        },
        {
          path:'/admin/roleManage',
          name:'roleManage',
          component:()=>import('../view/admin/roleManage/roleManage')
        },
        {
          path:'/admin/permissionShow',
          name:'permissionShow',
          component:()=>import('../view/admin/permissionShow/permissionShow')
        },
        {
          path:'/admin/checkModel',
          name:'checkModel',
          component:()=>import('../view/admin/checkModel/checkModel')
        },
        {
          path:'/admin/evaluate',
          name:'evaluate',
          component:()=>import('../view/admin/evaluateModel/evaluateModel')
        }
      ]
    },
    {
      path:'/algorithm',
      name:'algorithm',
      component:operate,
      children:[
        {
          path:'/algorithm/modelManage',
          name:'modelManage',
          component:()=>import('../view/algorithmManage/modelManage/modelManage')
        },
        {
          path:'/algorithm/algorithmManage',
          name:'algorithmManage',
          component:()=>import('../view/algorithmManage/algorithmManage/algorithmManage')
        },
        {
          path:'/algorithm/createTrain',
          name:'createTrain',
          component:()=>import('../view/algorithmManage/createTrain/createTrain')
        },
        {
          path:'/algorithm/trainManage',
          name:'trainManage',
          component:()=>import('../view/algorithmManage/trainManage/trainManage')
        },
        {
          path:'/algorithm/evaluateModel',
          name:'evaluateModel',
          component:()=>import('../view/algorithmManage/evaluateModel/evaluateModel')
        }
      ]
    }
  ]
});
export default router;
